<%= error_messages_for 'problem' %>
<% form_remote_tag :url => {:action => :show_contest,:problem => @problem } do%>
    <% options_for_contests = {}%>
    <% Contest.find(:all).each {|t| options_for_contests[t.name] = t.contest_id}%>
    Select contest:
    <% if @contest%>
    <%= select_tag :contest, options_for_select(options_for_contests,@contest.contest_id.to_i)%>
  <%else%>
    <%= select_tag :contest, options_for_select(options_for_contests)%>
  <%end%>
  <%= submit_tag "Select contest"%>
<% end %>  

<%= render(:partial => 'select_problem',:locals => {:problem => @problem,:contest => @contest})%>

<%= render :partial => 'menu'%>